package com.sise.wangzhan.client;

import com.sise.wangzhan.command.HelloCommand;

/**
 * @Classname HelloMain
 * @Description TODO
 * @Date 2020/4/22 21:23
 * @Created by wangzhan
 */
public class HelloMain {
    public static void main(String[] args) {
        //请求正常服务
        String normalUrl = "http://localhost:8090/normalHello";
        HelloCommand command = new HelloCommand(normalUrl);
        String result = command.execute();
        System.out.println("请求正常的服务，结果："+result);

        System.out.println("=======================================");

        //请求异常服务
        String normalUrl2 = "http://localhost:8090/errorHello";
        HelloCommand command2 = new HelloCommand(normalUrl2);
        String result2 = command2.execute();
        System.out.println("请求异常的服务，结果："+result2);
    }
}
